Telegram Group & Telegram Channel
🔥 Полезные библиотеки Python

Requests-HTML
— максимально простая и интуитивно понятная библиотека для парсинга html включая асинхронный парсинг.

Установка:
$ pip install requests-html

Пример использования:

1️⃣
from requests_html import HTMLSession
session = HTMLSession()
r = session.get('https://python.org/')


2️⃣
from requests_html import AsyncHTMLSession
asession = AsyncHTMLSession()
async def get_pythonorg():
r = await asession.get('https://python.org/')
return r

async def get_reddit():
r = await asession.get('https://reddit.com/')
return r

async def get_google():
r = await asession.get('https://google.com/')
return r

results = asession.run(get_pythonorg, get_reddit, get_google)
results # check the requests all returned a 200 (success) code
[<Response [200]>, <Response [200]>, <Response [200]>]

for result in results:
print(result.html.url)


Из коробки поддерживает сохранение cookie файлов, имитирует user-agent, асинхронные запросы, JavaScript и д.р. плюшки.

⚙️ GitHub/Инструкция

#python #github #soft
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/githubdevs/501
Create:
Last Update:

🔥 Полезные библиотеки Python

Requests-HTML
— максимально простая и интуитивно понятная библиотека для парсинга html включая асинхронный парсинг.

Установка:
$ pip install requests-html

Пример использования:

1️⃣

from requests_html import HTMLSession
session = HTMLSession()
r = session.get('https://python.org/')


2️⃣
from requests_html import AsyncHTMLSession
asession = AsyncHTMLSession()
async def get_pythonorg():
r = await asession.get('https://python.org/')
return r

async def get_reddit():
r = await asession.get('https://reddit.com/')
return r

async def get_google():
r = await asession.get('https://google.com/')
return r

results = asession.run(get_pythonorg, get_reddit, get_google)
results # check the requests all returned a 200 (success) code
[<Response [200]>, <Response [200]>, <Response [200]>]

for result in results:
print(result.html.url)


Из коробки поддерживает сохранение cookie файлов, имитирует user-agent, асинхронные запросы, JavaScript и д.р. плюшки.

⚙️ GitHub/Инструкция

#python #github #soft

BY GitHub программиста




Share with your friend now:
tg-me.com/githubdevs/501

View MORE
Open in Telegram


GitHub программиста Telegram | DID YOU KNOW?

Date: |

Telegram hopes to raise $1bn with a convertible bond private placement

The super secure UAE-based Telegram messenger service, developed by Russian-born software icon Pavel Durov, is looking to raise $1bn through a bond placement to a limited number of investors from Russia, Europe, Asia and the Middle East, the Kommersant daily reported citing unnamed sources on February 18, 2021.The issue reportedly comprises exchange bonds that could be converted into equity in the messaging service that is currently 100% owned by Durov and his brother Nikolai.Kommersant reports that the price of the conversion would be at a 10% discount to a potential IPO should it happen within five years.The minimum bond placement is said to be set at $50mn, but could be lowered to $10mn. Five-year bonds could carry an annual coupon of 7-8%.

NEWS: Telegram supports Facetime video calls NOW!

Secure video calling is in high demand. As an alternative to Zoom, many people are using end-to-end encrypted apps such as WhatsApp, FaceTime or Signal to speak to friends and family face-to-face since coronavirus lockdowns started to take place across the world. There’s another option—secure communications app Telegram just added video calling to its feature set, available on both iOS and Android. The new feature is also super secure—like Signal and WhatsApp and unlike Zoom (yet), video calls will be end-to-end encrypted.

GitHub программиста from vn


Telegram GitHub программиста
FROM USA